package com.example.base.system.service;

import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.base.excetion.GlobalExcetion;
import com.example.base.system.domain.SysApi;
import com.example.base.system.domain.vo.SysApiVo;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author X.I.O
 * @since 2024-04-10
 */
public interface SysApiService extends IService<SysApi> {

    public List<Integer> getApiIdsByRoleId(Serializable roleId);

    public void dealSysApi(String menuId, List<SysApi> sysApis) throws GlobalExcetion;

    public JSONArray getTreeArray();

    public List<SysApi> getSysApisByMenuIds(List<String> ids);

    public List<SysApi> getSysApisByMenuId(String menuId);

    public SysApi saveSysApi(SysApi sysapi) throws GlobalExcetion;

    public SysApi updateSysApiById(SysApi sysapi) throws GlobalExcetion;

    public SysApi saveOrUpdateSysApi(SysApiVo sysapiVo) throws GlobalExcetion;

    public IPage<SysApi> page(Integer page, Integer pageSize) throws GlobalExcetion;

    public SysApi getSysApiByUrl(String url);

}
